package com.onlinemusic.service;

import com.onlinemusic.common.R;
import com.onlinemusic.pojo.domain.PayItem;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface PayService {
    /**
     * 通用支付
     *
     * @param songIds
     * @param userId
     * @param payType
     * @return
     * @throws Exception
     */
    R commonAlipay(List<Integer> songIds, Integer userId, Integer payType) throws Exception;

    /**
     * 回调核销订单子项
     *
     * @param request
     * @return
     * @throws Exception
     */
    R commonPayNotify(HttpServletRequest request) throws Exception;

    /**
     * 回调跳转页面
     *
     * @param response
     * @throws Exception
     */
    void commonPayReturn(String tradeNo, String sign, HttpServletResponse response) throws Exception;

    R allPayList(Integer userId);

    /**
     * @Description: 返回所有支付记录
     **/
    List<PayItem> getAllPayItemList();
}
